package com.ym521.ymrouter.demo.main;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;

import com.ym521.ymrouter.demo.databinding.ActivityMainBinding;
import com.ym521.ymrouter.facade.annotation.YmRoute;
import com.ym521.ymrouter.launcher.YmRouter;


@YmRoute(path = "/test/main")
public class MainActivity extends AppCompatActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ActivityMainBinding binding = ActivityMainBinding.inflate(getLayoutInflater());
        setContentView(binding.getRoot());

        binding.tvGo.setOnClickListener(v->{
            YmRouter.getInstance()
                    .build("/test/main2")
                    .navigation();
        });
    }
}